package com.weishaoying.example.base.di;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author WeiShaoying
 * @date 2018/4/3
 */
public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class);
        OrderService orderService = context.getBean(OrderService.class);
        String hello = orderService.sayHello();
        System.out.println("hello = " + hello);
        context.close();
    }
}
